package edu.webtek.cloudreq;

import org.jdom2.Document;
import org.jdom2.Element;

public class ReqModifyItem extends ReqBase {
	private final String shopKey, itemName, itemURL, itemDescription;
	private final int itemID, itemPrice;

	public ReqModifyItem(String shopKey, String itemName, String itemURL,
			String itemDescription, int itemID, int itemPrice) {
		super();
		this.shopKey = shopKey;
		this.itemName = itemName;
		this.itemURL = itemURL;
		this.itemDescription = itemDescription;
		this.itemID = itemID;
		this.itemPrice = itemPrice;
	}

	@Override
	public Document toDocument() {
		Element shopKey = createElement("shopKey", this.shopKey);
		Element itemName = createElement("itemName", this.itemName);
		Element itemURL = createElement("itemURL", this.itemURL);
		Element itemDescription = createElement("itemDescription",
				this.itemDescription);
		Element itemID = createElement("itemID", this.itemID);
		Element itemPrice = createElement("itemPrice", this.itemPrice);

		Element modifyItem = createElement("modifyItem", shopKey, itemName,
				itemURL, itemDescription, itemID, itemPrice);

		return new Document(modifyItem);
	}

}
